package jungsun;

import java.util.Scanner;

	//나이계산 프로그램
	//변수:생년,현제년도,나이

public class J02Myage {
	public static void main(String[]args){
	//1.변수선언
	int birthYear;
	int currentYear;
	int age;
	Scanner sc = null;
	
	//2.생년입력,나이계산
	sc = new Scanner(System.in);
	System.out.println("생년일 입력하세요");
	birthYear = sc.nextInt();
	System.out.println("현제년도입력하세요");
	currentYear = sc.nextInt();
	
	age = currentYear - birthYear +1;
	
	//3.결과출력
	System.out.println(birthYear);
	System.out.println(age);
	System.out.println(currentYear);
	sc.close();
	
	}
	
}


